/*
 * @Description: 
 * @Date: 2022-12-17 09:37:36
 * @Author: lizhiqiang
 */
import { post, fileDownload , get } from "@/utils/request";
// 订单
export interface OrderReq {
    /**
     * 结束时间
     */
    endTime?: Date;
    /**
     * 每页显示条数
     */
    limit?: number;
    /**
     * 内部流水号
     */
    orderSn?: string;
    /**
     * 当前页
     */
    page?: number;
    /**
     * 渠道号
     */
    pkChannel?: string;
    /**
     * 商户号
     */
    pkMerchant?: string;
    /**
     * 开始时间
     */
    startTime?: Date;
}
// 渠道商订单查询
export const GCOL =(params:OrderReq)=>{
    return post("/cdwl-merchant/ordersmoneypayrequest/channelpageList",params)
}
// 商户订单查询
export const GMOL = (params:OrderReq)=>{
    return post("/cdwl-merchant/ordersmoneypayrequest/merchantpageList",params)
}
// 支付订单查询
export const loadPayOrderList = (params:OrderReq)=>{
    return post("/pay/admin/adminCommonPay/queryList",params)
}

// 支付订单查询--邑支付
export const YeeloadPayOrderList = (params:OrderReq)=>{
    return post("/pay/admin/dayi/pay/queryList",params)
}

// 支付订单 - 详情
export const loadPayOrderDetail = (params: any)=>{
    return post("/pay/admin/adminCommonPay/queryOrderById",params)
}

// 支付订单 - 详情--邑支付
export const YeeloadPayOrderDetail = (id: any,querySource:any)=>{
    return get(`/pay/admin/dayi/pay/detail?id=${id}&querySource=${querySource}`)
}

// 转账记录-邑支付
export const transferDetailAPI = (transferId: any)=>{
    return get(`/pay/admin/dayi/pay/transferLog?transferId=${transferId}`)
}

// 提现记录-邑支付
export const withdrawDetailAPI = (transferId: any)=>{
    return get(`/pay/admin/dayi/pay/withdrawLog?transferId=${transferId}`)
}

// 支付订单 - 导出
export const exportPayOrderList = (params: any, fileName: string)=>{
    return fileDownload("/pay/admin/adminCommonPay/export",params, fileName)
}

// 支付订单 - 导出新
export const exportPayOrderListNew = (params: any, fileName: string)=>{
    return fileDownload("/pay/admin/dayi/pay/export",params, fileName)
}

// 支付退款订单查询
export const loadPayRefundOrderList = (params:OrderReq)=>{
    return post("/pay/admin/adminCommonPay/refundList",params)
}

// 支付退款订单查询 - 导出
export const exportPayRefundOrderList = (params: any, fileName: string)=>{
    return fileDownload("/pay/admin/adminCommonPay/exportrefundOrders",params, fileName)
}

// 支付订单 - 商户信息汇总
export const getAppStatistic = (params: any)=>{
    return post("/pay/admin/adminCommonPay/orderStatisticsByAppCode",params)
}